package com.gcosc.hly.codejava.Utils;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class ThreadPoolUtils {
    private static ExecutorService executorService = Executors.newFixedThreadPool(5);

    public static Future<?> startFuture(Runnable runnable){
        Future<?> future = executorService.submit(runnable);
        return future;
    }

    public static void start(Runnable runnable){
        executorService.execute(runnable);
    }
}
